USE [ArtsShop]
GO

/****** Object:  StoredProcedure [dbo].[getProductById]    Script Date: 02/24/2011 07:36:02 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[getProductById]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[getProductById]
GO

USE [ArtsShop]
GO

/****** Object:  StoredProcedure [dbo].[getProductById]    Script Date: 02/24/2011 07:36:02 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- Author:		Francis A
-- Create date: 08/02/2011
-- Description:	return a product under a given its id
-- Sample execution: exec getProductById 5
-- =============================================
CREATE PROCEDURE [dbo].[getProductById]
	-- Add the parameters for the stored procedure here
	@productId int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	select * from Product where productId=@productId
	
END


GO


